package com.zmj.proxy.cglib;

import net.sf.cglib.proxy.Enhancer;

public class TestOrder {
    public static void main(String[] args) {

        Enhancer eh = new Enhancer();//生成代理类的子类
        eh.setCallback(new LoggerInterceptor());
        eh.setSuperclass(OrderServiceImpl.class);

        OrderServiceImpl o = (OrderServiceImpl) eh.create();

        o.rap();

    }
}
